package Equals;

/**
 * Enjoy programming!!!
 * 时间： 2021/10/22 -  16:35
 */
public class Equals01 {
    public static void main(String[] args) {
        String a = new String("abcd");
        String b = new String("abcd");
        String c = "abcd";
        String d = "abcd";
        if (a == b) {
            System.out.println("a == b");
        }
        if (a.equals(b)) {
            System.out.println("a = b");
        }
        if (d == a) {
            System.out.println("d == a");
        }
        if (c.equals(d)) {
            System.out.println("c = d");
        }
        if (c.equals(a)) {
            System.out.println("c = a");
        }
    }
}
